Network processing functions generally include parsing and examination of network packet headers, lookups based on the content of those headers, removal of headers (decapsulation), addition of headers (encapsulation), and/or modifications of headers. Lower-level network protocols successively encapsulate higher-level protocols, that is, a low-level protocol places a header prior to the start of the header for a higher-level protocol, and treats the higher-level protocol along with the rest of the frame as a payload for the low-level one. Depending on how deep into the protocol stack an application goes, a certain amount of the leading data is of interest to the classification portion of that application, and the rest of the frame is merely an “opaque capsule” that is passed from a receive port to some exit port.